From: cl349@freefall.cl.cam.ac.uk Date: Thu, 16 Sep 2004 09:32:52 +0000 (+0000) Subject: bitkeeper revision 1.1159.1.153 (41495dc4v3GzGJz41U0jh2uqLzhlIw) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~17400^2~598 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=55d708b41c87930de009573d71b888cd45091033;p=xen.git bitkeeper revision 1.1159.1.153 (41495dc4v3GzGJz41U0jh2uqLzhlIw) Fix ping with large/fragmented packets from domU to dom0. --- diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c index 44aa8e9dde..6de5cc51fd 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c @@ -393,11 +393,12 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) tx->size = skb->len; wmb(); /* Ensure that backend will see the request. */ - np->tx->req_prod = i + 1; + i++; + np->tx->req_prod = i; network_tx_buf_gc(dev); - if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) ) + if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE ) { np->tx_full = 1; netif_stop_queue(dev); @@ -410,7 +411,7 @@ static int network_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Only notify Xen if there are no outstanding responses. */ mb(); - if ( np->tx->resp_prod == i ) + if ( np->tx->resp_prod != i ) notify_via_evtchn(np->evtchn); return 0;